package com.spark.check

import android.os.Bundle
import android.view.View
import com.spark.common.BaseFragment
import com.spark.common.widget.ConfirmAlert
import kotlinx.android.synthetic.main.frag_check_aggree_refuse.*

/**
 * 审阅 通过/驳回
 */
class AgreeRefuseFragment : BaseFragment() {

    override fun contentResId(): Int {
        return R.layout.frag_check_aggree_refuse
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        iv_back.setOnClickListener { pop() }
        tv_confirm.setOnClickListener {
            val opinion = et_opinion.text.toString().trim()
            if (opinion.isNullOrBlank()) {
                activity?.apply {
                    ConfirmAlert(this)
                            .show("请输入通过意见")
                }
                return@setOnClickListener
            }

        }
    }
}